V = Variables
R = Reading functions
UNSIGNED BYTE —→ ASCII
The VR10UByToAsc function converts an Unsigned Bytes variable type (byte without sign) in an Ascii variable type.
VR10UByToAsc (value, index, array, errcode)
Parameters:
| IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
|---|---|---|---|---|
| IN | GLOBAL | value | W | Data value to convert |
| IN | GLOBAL | index | L | Index of the array element to start the “deposit” of the converted data |
| OUT | ARRGBL | array | B | Array containing the converted data (must be declared with at least “index + 1” items) |
| OUT | GLOBAL | errcode | F | Variable that indicates a possible error on function |
Una volta richiamata la funzione, 'errcode' può assumere determinati valori, il significato di tali valori è riassunto di seguito:
0: Nessun errore
1: Errore: il dato da convertire (value) è minore di 0 oppure maggiore di 255
Trasforma il valore 200 (unsigned byte) in un valore ascii
value = 200 index = 1 VR10UByToAsc (value, index, array, errcode) ;Sull'array si troverà : ; array[1] = 67 ; array[2] = 56